<?php
  class SESION
  {
  	var $idempleado;
        var $idrol;
  	var $bandera;

    function __construct()
    {
    	$this->idempleado   =   $_SESSION["idempleado"];
    	$this->idrol        =   $_SESSION["idrol"];
    	$this->bandera      =   $_SESSION["bandera"];
    }

    function validar_sesion()
    {
    	if((isset($this->idempleado)) && (isset($this->idrol)) && (isset($this->bandera))  && ($this->bandera=="t"))
    	{
      		return true;
    	}
    	else
    	{
    		return false;
    	}
    }
    function go_login($path)
    {
    	header("Location: ".$path."modulos/login/");
    }
    
    function go_home($path)
    {
    	header("Location: ".$path);
    }

  }
?>